<?
$page_title="Sevadhari - Requests List";
$mindex=3;
$profile_menu=1;
?>
<?include("includes/header.php") ?>

<?
$memberId=getMemberId();
$query="select * from bkitc_seva_request where member_id=".$memberId;
$req_info=qry_data($query);
?>
<div class="break"></div>

<?
$memberId=getMemberId();
if($memberId==0) kickOut();
$member=getMemberInfo($memberId);
$seva_interest=$member["reg_seva"];
?>

<div colspan="3" style="color:red">Note : Please take kind permission of your BK Center In Charge where you are attending Class and send the same to itncomm@bkconnect.net with your BKITC Membership No . and other relevant details</div>

<?if($seva_interest!=1){?>
<p>You have not completed the Sevadhari Registration Information yet. Please <a href="sevaregister.php">click here</a> to fill in the registration information.</p>
<? }else { ?>

<div>
<a href="sevarequest.php?mode=add">Click to add New request</a>
</div>
<table   class="table_panel" width="100%"  cellspacing="0" cellpadding="4">
	<tr  align="left">
	<th width="5">S.No</th>

	<th style="width:120px">Req.Date</th>
	<th>Status</th>
	<th >Location </th>
	<th>Date / Timings</th>
	<th>Other Info</th>


	</tr>
	<? foreach($req_info as $i=>$req) {?>

	<tr <?if($i%2==0) echo 'class="white_bg"'; else echo 'class="grey_bg"' ?>>
	<td><?=$i+1;?></td>
	
	<td ><?=$req["req_submitted_date"];?></td>
	<td><?=$seva_req_status[$req["approval_status"]];?></td>
	<td><?=$seva_location[$req["seva_location"]];?></td>
	<td>
	<?if($req["seva_location"]==1){?>
	Week Days : <?=$req["week_days_time"]?><br/>
	Week Ends &nbsp;&nbsp;&nbsp;: <?=$req["week_ends_time"]?><br/>
	
	<? }else{ ?>
	From : <?=$req["from_date"]?><br/>
	To &nbsp;&nbsp;&nbsp;: <?=$req["to_date"]?><br/>
	<? } ?>
	</td>
	<td><?=$req["other_info"]?></td>
	</tr>
	
	<? } ?>
	</table>
	<? if(count($req_info)==0) {?>
	<p>You have not made any requests for Seva yet. Please click here for <a href="sevarequest.php">new seva request<a/></p>
	<? } ?>

<? } ?>


<?include("includes/footer.php") ?>